In microprocessor-based computer systems, such as personal computers (PCs), display adapters are provided for interfacing video commands issued by the CPU with the PC's video display to control the operation thereof. One popular type of display adapter is the video graphics array, or VGA, manufactured by International Business Machines Corporation (IBM). Since its introduction in 1987, VGA has become so widely accepted that many software producers have developed applications programs which utilize VGA display modes (i.e., graphics and text modes) to produce the display output.
The growing popularity of operating system environments which provide windowing features, such as "Presentation Manager," developed by IBM, Armonk, N.Y., and "Microsoft Windows," developed by Microsoft Corporation, Redmond, Wash., has created problems with respect to VGA compatibility. In windowing environments, the video display screen may be divided into a plurality of display areas, or windows, in which different applications may be executed simultaneously. For example, a word processing application may be executed in a first window, while a spreadsheet application is executed in a second window. Although it is clearly desirable to provide users with the ability to execute VGA-based applications in windows, rather than full screen, computer hardware and software developers have discovered that such applications cannot be directly executed in windowing environments. Therefore, unless certain modifications are made to the PC's hardware or operating environment software, whenever a VGA-based application is to be executed, applications executing under the windowing environment must be suspended and the display screen must be blanked before the display output of the VGA-based application can be displayed.
Various techniques have been developed to overcome the above-described "VGA-in-a-window" problem. For VGA text modes, this has been accomplished by using software to map a VGA-based application's video buffer, which comprises a coded text buffer, to a virtual video buffer comprising a portion of video memory that is not being used to store data for display on the PC's display monitor. The application is then free to read from and write to its virtual video buffer at will. Periodically, a virtual device driver of the operating system will read the contents of the application's virtual video buffer and display it in the appropriate window on the display screen. Because coded text buffers are easily converted to text in a graphics mode, simulating, or "virtualizing," VGA text modes in the above manner is fairly straightforward and can be easily performed using only software.
Conversely, it would be extremely impractical, in terms of CPU overhead, to virtualize VGA graphics modes using only software. The main reason for this is that in VGA graphics modes, video memory is organized in a planar format in which video memory is divided into four separate bit planes with one bit of each four-bit pixel being stored on each of the planes. Typically, a CPU is able to access only one plane at a time; however, VGA adapters include certain graphics assist hardware that enables the CPU to simultaneously access all four :memory planes. As a result, in VGA graphics modes, whenever the CPU writes or reads one byte of data to or from video memory, four bytes of data, or,eight pixels, are actually affected. This same graphics assist hardware also performs other pixel data operations such as data rotate, color expansion, color compare and bit masking. The aforementioned operations performed by the graphics assist hardware to enable VGA to exploit the planar format of the video memory during video memory accesses are hereinafter referred to collectively as "VGA graphics assist functions."
Using software alone to simulate VGA graphics modes in a windowing environment would inhibit an application from reading from and writing to its virtual video buffer without invoking simulation software for each such access, as subsequent accesses to the virtual video buffer may be dependent upon data previously written thereto, but not yet processed by the simulation software. The CPU overhead involved in processing a virtual memory page fault and simulating the VGA graphics assist hardware for each access to the virtual video buffer makes any software-only method of virtualizing VGA graphics modes extremely slow and inefficient and therefore highly impractical.
Several graphics adapters, such as VGA, 8514/A and Image Adapter/A adapters, virtualize VGA graphics mode by utilizing actual VGA graphics assist hardware coupled with supervisory software. 16 KB blocks of off-screen video memory (corresponding to 4 KB blocks from the point of view of the CPU) are allocated to each application for use as a virtual video buffer and a virtual VGA device driver maps each application's video buffer to its virtual video buffer. VGA registers are loaded with values provided by the application, and the application is allowed freely to read and write VGA-style memory to and from its virtual video buffer, using the VGA graphics assist hardware to process each memory access. Periodically, the virtual device driver will render the virtual video buffer in the appropriate window on the display screen, In this manner, virtual memory page faults need only be processed if an application accesses video memory outside of its virtual video buffer. The use of actual VGA hardware to perform the graphics assist functions makes this VGA graphics mode virtualization technique practical.
More recently, IBM introduced a new display adapter standard, known as the extended graphics array, or XGA. XGA has two operating modes: a VGA mode and an "extended," or "native," mode. In its VGA mode, XGA is hardware compatible with a conventional VGA adapter and includes all VGA features and display modes. In its extended mode, it generates either 640 .times.480 or 1024.times.768 pixel resolution in graphics modes, as designated by applications software. Additionally, native mode XGA employs a linear, or "packed pixel," video memory format, rather than the planar format used in VGA. Therefore, if a pixel is :represented by eight bits of data, one byte of data read from or written to video memory affects eight bits of a single pixel, rather than 32 bits of eight pixels, as is the case in VGA graphics modes.
Present XGA adapter designs enable operation in either VGA mode or XGA native mode, but not both simultaneously, which means that when an XGA adapter is operating in its native mode, VGA graphics assist hardware, which is used When XGA is in VGA mode, is rendered inaccessible and virtual VGA graphics modes are not supported. As a result, because the VGA hardware cannot be accessed during operation in XGA native mode and because, as previously indicated, it is impractical to virtualize VGA graphics modes using only software, current XGA adapters and device drivers do not support VGA graphics modes in a window.
Therefore, what is needed is an XGA display adapter which supports virtualization of VGA graphics modes during XGA native mode operation.